import request from '@/utils/request'

// 创建管控措施
export function createControlMeasures(data) {
  return request({
    url: '/biz/control-measures/create',
    method: 'post',
    data: data
  })
}

// 更新管控措施
export function updateControlMeasures(data) {
  return request({
    url: '/biz/control-measures/update',
    method: 'put',
    data: data
  })
}

// 删除管控措施
export function deleteControlMeasures(id) {
  return request({
    url: '/biz/control-measures/delete?id=' + id,
    method: 'delete'
  })
}

// 获得管控措施
export function getControlMeasures(id) {
  return request({
    url: '/biz/control-measures/get?id=' + id,
    method: 'get'
  })
}

// 获得管控措施分页
export function getControlMeasuresPage(query) {
  return request({
    url: '/biz/control-measures/page',
    method: 'get',
    params: query
  })
}

// 导出管控措施 Excel
export function exportControlMeasuresExcel(query) {
  return request({
    url: '/biz/control-measures/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
